package geradatawarehouse.dao.oracle;

import geradatawarehouse.bean.AlunoRegular;
import geradatawarehouse.dao.oracle.abs.AbstractAlunoOracleDAO;

import java.io.IOException;
import java.sql.SQLException;

public class AlunoRegularOracleDAO extends AbstractAlunoOracleDAO<AlunoRegular> {
	private static final String ALUNO_REGULAR_SQL = "aluno_regular.sql";

	public AlunoRegularOracleDAO(final int anoSem) throws IOException {
		super(anoSem, AlunoRegularOracleDAO.ALUNO_REGULAR_SQL);
	}

	@Override
	public AlunoRegular next() throws SQLException {

		AlunoRegular a = null;

		if (this.resultSet.next()) {

			a = new AlunoRegular();
			this.fillAbstractAluno(a);

			a.setDataMovAluno(this.parseDate(this.resultSet
					.getString("DATAMOVALUNO")));
			a.setLetraTurma(this.resultSet.getString("LETRATURMA"));
			a.setModEnsino(this.resultSet.getString("MODENSINO"));
			a.setSerie(this.resultSet.getString("SERIE"));
			a.setStatusMovAluno(this.resultSet.getString("STATUSMOV"));
		}

		return a;
	}
}
